﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeGen;
using System.Diagnostics;
using System.Reflection;
using JUtil.ResourceManagement;
using JUtil;

namespace GenMasterViewConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            TestAnotherBllFile();

            //TestSqlFileGenerator();

            //TestAnotherDalFile();

            //MasterViewGenerator.Test();

        }

        static void TestAnotherBllFile()
        {
            AnotherBllFile g = new AnotherBllFile(
                "NAMESPACE",
                "BLL_CLASS",
                "DAL_CLASS",
                "GetSelectSQLNoOrderBy",
                "GetSelectDetailsVwSQL",
                "GetInsertSQL",
                "GetUpdateSQL",
                "GetDeleteSQL",
                DatabaseMode.Oracle,
                "ConnectionString",
                Formatter.DbType.Oracle);

            g.Export(@"C:\1.bll.cs");
        }

        static void TestAnotherDalFile()
        {
            DalFile g = new DalFile("AA", "BB", new List<DalProperty>
            {
                new DalProperty{ Type=typeof(int), Name="aa"},
                new DalProperty{ Type=typeof(string), Name="bb"}
            });

            g.Export(@"C:\1.cs");
        }

        static void TestSqlFileGenerator()
        {
            CodeGen.SqlFile g = new CodeGen.SqlFile(
                "a",
                "b",
                "c",
                "d",
                "e",
                "f");

            g.Export(@"C:\1.sql");
        }

    }
}
